export default function filter(Arr: string[]) {
    if (Arr.length <= 1) {
        return Arr
    }
    const FatherList = Arr.filter((item: any) => {
        return item.father_id === 0
    })
    const SonList=Arr.filter((item:any)=>{
        return item.father_id!==0
    })
    FatherList.forEach((item:any)=>{
        item.children=[]
        SonList.forEach(((itemm:any)=>{
            if(itemm.father_id===item.comment_id){
                item.children.push(itemm)
            }
        }))
    })
    return FatherList
}
